home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Night Owl 6
/
Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso
/
007a
/
gmd_200.zip
/
GMD.DOC
< prev
Wrap
Text File
|
1991-02-24
|
12KB
|
223 lines
Grunged Message Delete (GMD) Utility
Version 2.00
I. What does GMD do?
GMD deletes messages not "reasonably" conforming to 1.MSG format. GMD
will also delete messages which have strange characters. Through
command line switches, GMD provides the user some control over the
meaning of "reasonably conforming" and "strange characters". Command
line switches also control other options such as which message areas
are to be scanned for grunged messages.
II. Why use GMD?
There are two reasons you would want to use GMD. First, grunged
messages can caused some message renumbering programs to lockup. Since
message renumbering is usually a part of nightly processing, your
automatic nightly processing is exposed to locking up while you are not
around. When you discover the lockup, you are faced with the task of
finding the grunged message, deleting it and then completing the
nightly processing. It is not uncommon for the recovery process to
last several hours at in inopportune time.
The other reason to delete grunged message is to spare your users from
seeing garbage.
III. When do I use GMD?
The recommended placement of GMD is just before the message delete and
renumber phase of your nightly processing. Running it once per day in
this manner should be adequate.
IV. What is a "grunged" message?
This is a fuzzy question and it gets a fuzzy answer. A grunged message
is a message which does not reasonably conform to the 1.MSG format. It
turns out that strict conformance is not desired because so many
messages fail to strictly conform to the standard (e.g., strict
conformance to the standard requires two spaces between the year and
time in the date/time stamp field of the message -- it is fairly common
to have only one space). Thus, strict conformance would result in
deleting messages generally considered acceptable.
GMD allows some customizing of the parameters used to determine a
grunged message. Because the content of the message body is so
unstructured, GMD does not consider the message body when making the
grunged decision. GMD considers only the "Date", "From", "Subject" and
"To" fields of the message header. For each of these four fields, you
can control two parameters.
Those parameters are whether or not a zero length string is permitted
and how many non-ASCII characters (characters with the high order bit
set) are permitted. This may seem very simplistic, but it is
surprisingly effective.
By default, zero length fields are permitted. If you want zero length
fields detected as grunged, specify the "-zlDate", "-zlFrom",
"-zlSubject" and/or "-zlTo" switches on the command line.
By default, no non-ASCII character in the "Date", "From", "Subject" or
"To" fields occurring before the field terminating null character is
permitted. (Any character is permitted after the end of the field.)
One of the classic symptoms of grunged messages is non-ASCII characters
throughout the message. It is this characteristic of severely grunged
messages which is easy to detect. Unfortunately, some message editors
will insert a leading hex FF in their fields. If no non-ASCII
characters are permitted, these messages would be detected as grunged.
By command line switches, you can relax this criteria and permit some
non-ASCII characters before calling the message grunged.
The command line switches controlling the number of permitted non-ASCII
characters are "-Date:n", "-From:n", "-Subject:n" and "-To:n". In
place of the "n" after the colons, you should substitute the number of
non-ASCII you will tolerate before the message is considered grunged.
The default for all the above switches is zero.
V. How do I tell GMD which message echos to scan?
You tell GMD which echos to process by two optional switches on the
command line. The first switch is "-a<Areas.BBS>". In place of
"<Areas.BBS>" you must substitute the name and path of your
ConfMail/QMail style Areas.BBS file. GMD will read Areas.BBS and get
the names of echo directories to be processed. GMD will skip
passthrough areas.
There may be directories not listed in Areas.BBS which you want scanned
for grunged messages (e.g., local mail and net mail). You can specify
additional directories to scan by specifying the switch "-d<directory>"
as many times as you need. In place of "<directory>" you must
substitute the pathname of a directory you want scanned. You must omit
the trailing backslash.
Mail processors such as QMail output files called "toss logs". The
toss log is a file which contains a list of echo area names where there
was incoming mail. The echos are listed one per line. GMD can use
such a file by specifying the "-e<toss_log>" switch, where "<toss_log>"
is the toss log file described above. When the "-e" switch is used,
the "-a" switch must also be specified.
The "-e" switch alters GMD's logic. Normally, GMD will skip passthru
areas because there are no messages. When "-e" is specified, the
passthru areas will be processed because there may be messages which
have not been packed. For non-passthru areas, the first message is
assumed to be a "high water mark". GMD will skip all messages before
the high water mark. The "-e" switch is designed to remove grunged
messages as they come in (and before they are scanned and packed).
When the "-p" switch is specifed along with the "-e" switch, passthru
areas are skipped even if they appear in the toss log.
At least one of "-a" or "-d" switch is required. You may specify
both, and can use the "-d" switch as many times as needed.
VI. Is there a way to have GMD move the grunged messages to a holding area
instead of deleting them?
Yes, you can accomplish this by using the "-b<BadDirectory>" command
line switch. In place of "<BadDirectory>" you must substitute the
directory pathname where GMD is to move grunged messages. That
directory does not have to be on the same drive as the message
directory. However, it should be a directory used solely for the
purpose of storing grunged messages.
GMD will name the messages in this directory as follows. The file name
of the grunged message will be up to the first eight characters of the
echo name. The extension will be the lowest three digit number not
already used to identify a message. The date and time stamp of the
original message is preserved.
For example, the first bad message in the echo "TECH" would be named
"TECH.001" in the bad directory. If there were already a "TECH.001",
it would have been name "TECH.002", etc. For the echo "CONSULTING",
the first bad message would be "CONSULTI.001".
If the echo name contains illegal DOS filename characters, those
characters are dropped. For example, the first bad message in the echo
"A.B.C." would be named "ABC.001" in the bad directory.
VII. How can my batch file determine when GMD detects any grunged messages?
GMD set the DOS errorlevel as follows:
ErrorLevel Meaning
0 GMD ended normally and detected no grunged messages.
1 GMD ended normally and detected grunged messages.
2 GMD did not end normally due to error or ^C.
VIII. Is there a way to just get a list of the grunged messages and not
delete or move them?
Yes, you can specify the "-t" switch on the command line. This puts
GMD in test mode. In test mode, GMD will not delete or move any
messages, but it will list all grunged message file names along with
their corresponding echo name.
Although GMD does not have a log facility, you can re-direct the
output. Re-direction will work even if the "-t" switch is not used.
IX. Can I control the amount of log detail GMD produces?
Yes, you can specify the "-l:n" switch. The value "n" sets the detail
level. The legal values are:
Value Meaning
0 Only error messages are printed to standard error.
1 Signon message is printed to standard error.
2 Actions are printed to the console.
3 As each echo area is processed, it is logged to the console.
4 Progress for each echo area is shown.
X. How long does GMD take to run?
GMD takes about as much time as the fastest ReNum program. You can
speed this process up by specifying the "-f" switch on the command
line. "-f" places GMD in the fast mode. In this mode, GMD bypasses
normal DOS file structures and reads the disk directly. (GMD never
bypasses DOS when writing to the disk.) This may not work for all
versions of DOS or future versions of DOS. How fast "-f" actually
speeds up processing depends on disk organization and fragmentation.
Since GMD does not directly write to the disk, it is safe to try the
"-f" switch along with the "-t" to see if it works. GMD has several
internal consistency checks to insure it is reading the correct data.
If the internal consistency check fails, the message "Fast mode
disabled." will appear. If this happens or GMD locks up, the "-f"
switch should not be used. All the assumptions made by the "-f" switch
are fully listed in the source to the program.
XI. Is there a quick reference available?
Yes, simply run GMD with no switches. It will print a summary of the
above switches on a single page.
XII. What licensing restrictions are there for using this program?
There are some simple restrictions associated with using the program.
You use this program at your own risk. The author does not warrant the
program works as described above or is even suitable for any particular
purpose. The above documentation is intended to describe how the
program works in the author's environment. The author does not claim
it will work the same way in your environment or, if it does work, will
continue to work. Further, it is up to you to decide if the program is
suitable for any particular purpose on your system. The author
sincerely hopes you find some use for it.
The author freely releases this program along with its source to the
public domain. The program compiles and links using Turbo-C++ with no
errors. The author desires no fees for the use of the program and does
not support the program. The source is provided so you can make any
changes you may need to make GMD suitable for your purposes.
Basically, this program was a toy and the author has finished playing
with it. The author is not willing to make any further enhancements.
Please do not contact the author with ideas for enhancements. You have
the source. You make them. As time permits, the author is willing to
answer questions about techniques used and how the program generally
works. Also, John Souvestre (at 1:396/1) will attempt to answer
questions as his time permits.
David Troendle (1:396/5)
February 24, 1991
New Orleans, LA